package social_network.dao;

import social_network.entities.Film;
import social_network.entities.Member;
import social_network.exceptions.NotExistsParameterException;
import social_network.exceptions.NotUniqueParameterException;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Vitaliy Muzalevskiy
 * Date: 17.07.13
 * Time: 1:08
 */
public class MemberDaoImpl implements MemberDao {

    public static final String ADD_MEMBER_SQL = "INSERT INTO network.member "
            + "VALUES( null, ?, ? )";

    public static final String SELECT_BY_ID_SQL = "SELECT * FROM " +
            "network.member WHERE id = ?";

    public static final String SELECT_BY_NAME_SQL = "SELECT * FROM " +
            "network.member WHERE surname = ? OR name = ?";

    public static final String SELECT_BY_FULL_NAME_SQL = "SELECT * FROM " +
            "network.member WHERE surname = ? AND name = ?";

    public static final String DELETE_BY_ID_SQL = "DELETE FROM network.member "
            + "WHERE id = ?";

    public static final String UPDATE_MEMBER_SQL = "UPDATE network.member SET"
            + "name = ? surname = ? WHERE id = ?";

    public static final String SELECT_FILMS_WITH_MEMBER_SQL = "SELECT film_id FROM " +
            "network.member_film_connection WHERE member_id = ?";

    public static final String ATTRIBUTE_ID = "id";
    public static final String ATTRIBUTE_NAME = "name";
    public static final String ATTRIBUTE_SURNAME = "surname";

    @Override
    public void addDirector(Member member) throws NotUniqueParameterException {

    }

    @Override
    public Member selectMemberByID(int id) {
        return null;
    }

    @Override
    public List<Member> selectMemberByFullName(String name, String surname) {
        return null;
    }

    @Override
    public List<Member> selectMemberByName(String surname) {
        return null;
    }

    @Override
    public void deleteMemberByID(int id) throws NotExistsParameterException {

    }

    @Override
    public void updateMemberInfo(int id, String newName, String newSurname) throws NotExistsParameterException {

    }

    @Override
    public List<Film> getMemberFilms(int id) {
        return null;
    }
}
